﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApplication1
{
    class Operators_Complex : Operators
    {
        
        public override Number PlusMethod(Number s1, Number s2)
        {
            return new Complex_number(s1.real_part + s2.real_part, s1.imaginary_part + s2.imaginary_part);
        }
       
        public override Number MinusMethod(Number s1, Number s2)
        {
            return new Complex_number(s1.real_part - s2.real_part, s1.imaginary_part - s2.imaginary_part);
        }
      
        public override Number UmnozitMethod(Number s1, Number s2)
        {
            return new Complex_number(s1.real_part * s2.real_part - s1.imaginary_part * s2.imaginary_part, s1.real_part * s2.imaginary_part + s2.real_part * s1.imaginary_part);
        }
       
        public override Number RarzelitMethod(Number s1, Number s2)
        {
            return new Complex_number(s1.real_part - s2.real_part, s1.imaginary_part - s2.imaginary_part);
        }

        public override Number SqrtMethod(Number s)
        {
            return null;
        }
    }

}
